// src/utils/auth.js
import axios from "./axios";

export async function checkLogin() {
	try {
		const res = await axios.get("/check_login");
		return res.data?.status === "success" && res.data.data?.loggedIn;
	} catch {
		return false;
	}
}

export async function logout() {
	try {
		const res = await axios.post("/logout");
		return res.data?.status === "success";
	} catch {
		return false;
	}
}

